In this paper, we show that the restricted singular value decomposition of a matrix triplet $A\in \R^{n \times m}, B\in \R^{n \times l}, C\in \R^{p \times m}$ can be computed by means of the cosine-sine decomposition. In the first step, the matrices A, B, C are reduced to a lower-dimensional matrix triplet ${\cal A}, {\cal B}, {\cal C}$, in which ${\cal B}$ and ${\cal C}$ are nonsingular, using orthogonal transformations such as the QR-factorization with column pivoting and the URV decomposition. In the second step, the components of the restricted singular value decomposition of A, B, C are derived from the singular value decomposition of ${\cal B}^{-1}{\cal A}{\cal C}^{-1}$. Instead of explicitly forming the latter product, a link with the cosine-sine decomposition, which can be computed by Van Loan's method, is exploited. Some numerical examples are given to show the performance of the presented method.